package com.tianxinweb.entity;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author cboy
 * @since 2018-08-07
 */
@TableName("tx_bank_card")
public class BankCard implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "card_id", type = IdType.AUTO)
    private Integer cardId;
    /**
     * 所属银行名称
     */
    @NotNull
    @Length(max = 32)
    private String bankName;
    /**
     * 银行卡号
     */
    @NotNull
    @Length(max = 32)
    private String cardNumb;
    /**
     * 用户姓名
     */
    @NotNull
    @Length(max = 32)
    private String username;
    /**
     * 身份证号码
     */
    @NotNull
    @Length(min=18,max = 18)
    private String idcard;
    /**
     * 手机号码
     */
    @NotNull
    @Pattern(regexp = "^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\\d{8}$")
    private String phone;
    /**
     * 所属用户id
     */
    private Integer userId;

    private transient String checkcode;

    public String getCheckcode() {
        return checkcode;
    }

    public void setCheckcode(String checkcode) {
        this.checkcode = checkcode;
    }

    public Integer getCardId() {
        return cardId;
    }

    public void setCardId(Integer cardId) {
        this.cardId = cardId;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getCardNumb() {
        return cardNumb;
    }

    public void setCardNumb(String cardNumb) {
        this.cardNumb = cardNumb;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "BankCard{" +
        ", cardId=" + cardId +
        ", bankName=" + bankName +
        ", cardNumb=" + cardNumb +
        ", username=" + username +
        ", idcard=" + idcard +
        ", phone=" + phone +
        ", userId=" + userId +
        "}";
    }
}
